﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TR.Domain.Entity;

namespace TR.EFCore.Configers
{
    public class CsConfigers: IEntityTypeConfiguration<Cs>
    {
        public void Configure(EntityTypeBuilder<Cs> builder)
        {
            //类配置
            builder.ToTable(nameof(Cs));
            builder.Property(e => e.name).IsRequired(false).HasMaxLength(20);
        }
    }
}
